<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>提示信息</title>
    <style>
        body {
            background-color: #96cbeb;
        }
        
        .message {
            width: 400px;
            height: 200px;
            margin: 50px auto;
            text-align: center;
            line-height: 200px;
            color: #f00;
            font-size: 24px;
            border: 1px solid #ccc;
        }
    </style>
</head>

<body>
    <div class="message">
        {{message}}!
        <span class="timer">{{time}}</span>s即将跳转... </div>
</body>
<script>
    var time = '{{time}}';
    var timer = setInterval(() => {
        time--;
        document.querySelector('.timer').innerHTML = time
        if (time === 0) {
            location.href = '{{url}}'
                // 清除定时器
            clearInterval(timer)
            time = '{{time}}';
        }
    }, 1000)
</script>

</html>